package com.sky.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebAppConfigurer implements WebMvcConfigurer {

    /**
     * 配置本地资源映射
     *
     * @Param:
     * @Return:
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

        registry.addResourceHandler("/image/**")  //请求路径
                .addResourceLocations("file:D:\\tmp\\sky_take_out\\");        //本地地址
    }
}